package com.pai.entity.router;

import java.util.ArrayList;
import java.util.List;

/**
 * 路由的元？？
 */
public class Meta {
//    alwaysShow: true
//    hidden: false
//    icon: "system"
//    keepAlive: true
//    roles: ['ADMIN']
//    title: "系统管理"
    private boolean alwaysShow;  //总是显示选项
    private boolean hidden;  //隐藏选项
    private String icon;  //图标
    private boolean keepAlive;  //保持选中
    private List<String> roles;  //可访问角色列表
    private String title;  //导航栏名称

    public boolean isAlwaysShow() {
        return alwaysShow;
    }

    public void setAlwaysShow(boolean alwaysShow) {
        this.alwaysShow = alwaysShow;
    }

    public boolean isHidden() {
        return hidden;
    }

    public void setHidden(boolean hidden) {
        this.hidden = hidden;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public boolean isKeepAlive() {
        return keepAlive;
    }

    public void setKeepAlive(boolean keepAlive) {
        this.keepAlive = keepAlive;
    }

    public List<String> getRoles() {
        return roles;
    }

    public void setRoles(String[] roles) {
        this.roles = new ArrayList<>();
        for(int i = 0 ; i < roles.length; i ++){
            this.roles.add(roles[i]);
        }
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}
